package com.hqyj.pojo;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 
 * </p>
 *
 * @author rock
 * @since 2021-10-20
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class SalaryScale extends MyPage implements Serializable {

    private static final long serialVersionUID=1L;

    private Integer salaryId;

    private String basePay;

    private String meritPay;

    private String bonus;

    private String fine;

    private String numberSalary;

    private Date timeSalary;

//
//    public void setAttendanceDate(String attendanceDate) {
//        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
//
//        try {
//            this.attendanceDate = sdf.parse(attendanceDate);
//        } catch (ParseException e) {
//            e.printStackTrace();
//        }
//    }
//    public String getAttendanceDate(){
//        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
//        if (this.attendanceDate != null){
//            return sdf.format(this.attendanceDate);
//        }
//        return "";
//    }
    public void setTimeSalary(String timeSalary){
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");

        try {
            this.timeSalary = sdf.parse(timeSalary);
        } catch (ParseException e) {
            e.printStackTrace();
        }

    }
    public String getTimeSalary(){
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
        if (this.timeSalary != null){
            return sdf.format(this.timeSalary);
        }
        return "";
    }


}
